﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TypingG
{
    
   
    public partial class LoginDP : Form
    {
        private MainMenu menu = new MainMenu();
        public LoginDP()
        {
            InitializeComponent();
            SQLServer.Start("WIN7-PC", "typinggame");
            onMenu();
        }


        private void BtnRegis_Click(object sender, EventArgs e)
        {
            RegisDP r = new RegisDP();
            r.ShowDialog();

        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            
            
            this.Hide();
            Server s = new Server();
            s.ShowDialog();
        }

        private void BtnexitClick(object sender, EventArgs e)
        {
            Application.Exit();
        }
        private void onMenu()
        {
            MenuItem item = new MenuItem("&Quản Lý Hệ Thống DataBase");
            MenuItem itemi1 = new MenuItem("&AdminstratorLogin");
            item.MenuItems.Add(itemi1);
            itemi1.Shortcut = Shortcut.CtrlL;
            menu.MenuItems.Add(item);
            this.Menu = menu;
            itemi1.Click += new EventHandler(itemi1_Click);
        }

        void itemi1_Click(object sender, EventArgs e)
        {
            AdminLogin admin = new AdminLogin();
            admin.ShowDialog();
        }
    }
}
